package com.wx.javacode.poly_;

/**
 * ClassName:polyExercise
 * Package :com.wx.javacode.poly_
 * Description :
 *
 * @Author : coder_mu
 * @Create : 2023/5/18 - 15:27
 */
public class polyExercise {
    public static void main(String[] args) {
//        Animal animal = new Animal("小狗");
        Dog dog = new Dog("小狗");
        Food food = new Food("骨头");
        Master master = new Master("小王");
        master.feed(dog,food);
        Pig pig = new Pig("小猪");
        Rice rice = new Rice("米饭");
        master.feed(pig,rice);
    }
}
